OUT = fcomp

INCLUDE = -I/usr/include/
LIBDIR  = -L/usr/X11R6/lib -L../libfractal/

COMPILERFLAGS = -Wall -g
CC = g++
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
LIBRARIES = -lX11 -lXi -lXmu -lglut -lGL -lGLU -lm -lfractal

SRC = main.cpp
OBJ = $(SRC:.cpp=.o)

OUT: $(OBJ) ../libfractal/libfractal.a
	$(CC) $(LIBDIR) -o $(OUT) $(OBJ) $(LIBRARIES)
../libfractal/libfractal.a:
	make -C ../libfractal
%.o: %.cpp
	$(CC) $(CFLAGS) -c -o $@ $<
clean:
	make -C ../libfractal clean
	rm -f $(OBJ) $(OUT)